package com.ccn.crm.mapper;

import com.ccn.crm.model.AfterSales;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
@Repository
public interface AfterSalesMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AfterSales record);

    AfterSales selectByPrimaryKey(Integer id);

    List<AfterSales> selectAll();

    int updateByPrimaryKey(AfterSales record);

    AfterSales selectSalesByWorkOrder(String workorder);
    AfterSales selectSalesByTimeId(String timeId);
    AfterSales selectConsumedByName(String timebelongs);
    AfterSales selectLastWeekConsumedByName(String timebelongs);

    int updateDateByTimeId(@Param("timeId") String timeId , @Param("date")Date date);
}